/*
 * sdmmc_hal.c
 *
 *  Created on: Oct 16, 2013
 *      Author: Ken Arok
 */

#include "board.h"
#include "gpio.h"
#include "sdmmc_hal.h"


uint8_t sdmmc_read_card_detect_pin(void)
{
#if SDMMC_TYPE == MICROSD
	return 2;
#elif SDMMC_TYPE == SDMMC
	if(gpio_get_pin_value(SD_MMC_CARD_DETECT_PIN)) return 1;
	else return 0;
#endif
}


uint8_t sdmmc_read_write_protect_pin(void)
{
#if SDMMC_TYPE == MICROSD
	return 1;
#elif SDMMC_TYPE == SDMMC
	if(gpio_get_pin_value(SD_MMC_WRITE_PROTECT_PIN)) return 1;
	else return 0;
#endif
}
